package com.liugui.consumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.liugui.api.service.UserService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @ClassName: UserController
 * @Author: liugui
 * @Date: 2021-03-21 11:49
 **/
@Component
public class UserController implements CommandLineRunner {
    @Reference(interfaceClass = UserService.class)
    private UserService userService;

    @Override
    public void run(String... args) throws Exception {
        System.out.println(userService.selectUserById(3));
    }
}
